package com.lcj.bff.driver.feign;

import com.lcj.bff.driver.controller.form.*;
import com.lcj.common.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @Author : lcj
 * @create 2022/11/16 16:40
 */
@FeignClient(value = "aoch-odr")
public interface OrderServiceApi {

    @PostMapping("/order/searchDriverOrderTotalNumber")
    public Result searchDriverOrderTotalNumber(DriverIdForm form);

    /**
     * 查询司机本周接单量
     * @param form
     * @return
     */
    @PostMapping("/order/searchDriverOrderWeekNumber")
    public Result searchDriverOrderWeekNumber(DriverIdForm form);

    /**
     * 查询司机申述数
     * @param form
     * @return
     */
    @PostMapping("/comment/searchDriverAppealNumber")
    public Result searchDriverAppealNumber(DriverIdForm form);

    /**
     * 查找司机今日数据
     * @param form
     * @return
     */
    @PostMapping("/order/searchDriverTodayBusinessData")
    public Result searchDriverTodayBusinessData(DriverIdForm form);

    /**
     * 司机抢单
     * @param form
     * @return
     */
    @PostMapping("/order/acceptNewOrder")
    public Result acceptNewOrder(AcceptNewOrderForm form);

    /**
     * 查询司机执行订单
     * @param form
     * @return
     */
    @PostMapping("/order/searchDriverExecuteOrder")
    public Result searchDriverExecuteOrder(AcceptNewOrderForm form);

    /**
     * 查询司机当前执行订单
     * @param form
     * @return
     */
    @PostMapping("/order/searchDriverCurrentOrder")
    public Result searchDriverCurrentOrder(DriverIdForm form);

    /**
     * 查询订单信息用于司乘同显
     * @param form
     * @return
     */
    @PostMapping("/order/searchOrderForMoveById")
    public Result searchOrderForMoveById(SearchOrderForm form);

    /**
     * 司机到达接送点
     * @param form
     * @return
     */
    @PostMapping("/order/arriveStartPlace")
    public Result arriveStartPlace(ArriveStartPlaceForm form);

    /**
     * 确认开始驾驶
     * @param form
     * @return
     */
    @PostMapping("/order/startDriving")
    public Result startDriving(StartDrivingForm form);

    /**
     * 更新订单状态
     * @param form
     * @return
     */
    @PostMapping("/order/updateOrderStatus")
    public Result updateOrderStatus(UpdateOrderStatusForm form);

    /**
     * 校验订单是否属于该司机,如果属于,获取订单信息
     * @param form
     * @return true+orderInfo / false
     */
    @PostMapping("/order/validDriverOwnOrderAndGetInfo")
    public Result validDriverOwnOrder(SearchOrderForm form);

    /**
     * 查询计算费用所需各时间字段
     * @param form
     * @return
     */
    @PostMapping("/order/searchSettlementNeedData")
    public Result searchSettlementNeedData(SearchOrderForm form);

    /**
     * 计算完行程费,奖励费,分账费后,更新订单的账单记录
     * @param form
     * @return
     */
    @PostMapping("/bill/updateBillFee")
    public Result updateBillFee(UpdateBillFeeForm form);

    /**
     * 司机预览账单
     * @param form
     * @return
     */
    @PostMapping("/bill/searchReviewDriverOrderBill")
    public Result searchReviewDriverOrderBill(SearchOrderForm form);

    /**
     * 查询订单状态
     * @param form
     * @return
     */
    @PostMapping("/order/searchOrderStatus")
    public Result searchOrderStatus(SearchOrderForm form);

    /**
     * 更新订单相关的付款信息
     * @param form
     * @return
     */
    @PostMapping("/order/updateOrderAboutPayment")
    public Result updateOrderAboutPayment(SearchOrderForm form);

    /**
     * 分页查询订单和评价列表
     * @param form
     * @return
     */
    @PostMapping("/order/searchOrderAndCommentByPage")
    public Result searchDriverOrderByPage(SearchDriverOrderByPageForm form);

    /**
     * 查询订单评价
     * @param form
     * @return
     */
    @PostMapping("/comment/searchCommentByOrderId")
    public Result searchCommentByOrderId(SearchOrderForm form);

    /**
     * 查询司机本周好评数
     * @param form
     * @return
     */
    @PostMapping("/comment/searchWeekGoodCommentNumber")
    public Result searchWeekGoodCommentNumber(DriverIdForm form);


    @PostMapping("/order/searchOrderById")
    public Result searchOrderById(SearchOrderForm form);
}
